{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\yinwe\Dropbox\My Current Project\HK election\PSRM_final_submission\Map.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}26 Oct 2021, 09:54:48

{com}. do "C:\Users\yinwe\AppData\Local\Temp\STD730_000000.tmp"
{txt}
{com}. 
. cd "C:\Users\yinwe\Dropbox\My Current Project\HK election\Data-HK\HKmap"
{res}C:\Users\yinwe\Dropbox\My Current Project\HK election\Data-HK\HKmap
{txt}
{com}. 
. import delimited "make_map.csv", varnames(1) clear // csv file exported from CF results 
{res}{text}(4 vars, 435 obs)

{com}. rename mapid2019 id2019
{res}{txt}
{com}. rename resulttauhat htes
{res}{txt}
{com}. drop v1
{txt}
{com}. save "make_map.dta", replace
{txt}file make_map.dta saved

{com}. 
. format htes %13.2f
{txt}
{com}. use "hkdb.dta", clear
{txt}
{com}. keep id 编号
{txt}
{com}. rename 编号 id2019 
{res}{txt}
{com}. merge m:1 id2019 using "make_map.dta"
{res}
{txt}{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}              17
{txt}{col 9}from master{col 30}{res}              17{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}matched{col 30}{res}             435{txt}  (_merge==3)
{col 5}{hline 41}

{com}. replace htes=0 if significant==0
{txt}(250 real changes made)

{com}. drop _merge id2019 significant
{txt}
{com}. 
. spmap htes using hkcoord, id(id) fcolor(YlGn) legend(pos(6) row(2) ring(1))
{res}{txt}
{com}. 
{txt}end of do-file

{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\yinwe\Dropbox\My Current Project\HK election\PSRM_final_submission\Map.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}26 Oct 2021, 09:55:02
{txt}{.-}
{smcl}
{txt}{sf}{ul off}